<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
   <title>开设教学班</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

		
</head>
<body>
	<!-- layout::Auth:header::0 -->
    <script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
    <script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
    <script type="text/JavaScript">
        $(function(){
            $('#form1').ajaxForm({
                //beforeSubmit:  function(){alert("before");},  // pre-submit callback
                success:       complete,  // post-submit callback
                error:function(){alert("error");},
                dataType: 'json'
            });
            
            function complete(data){
                if (data.status==1)
                {
                	window.location='__URL__/classdetail';
                }else{
                    $('#result').html(data.info).show();
                }
            }
        });
      </script>
     <div class="container-fluid">
      <div class="row-fluid">
    	<!-- layout::Auth:leftmenu::0 -->
        	<div class="span8">
          		<div class="hero-unit">
          			<h1>开设教学班</h1>
                    <p style="font-size:12px">
                    当前位置：
                    	<a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                        <a href='__URL__/index' class="nowpositionhref">后台管理</a>>
                        <a href='__URL__/classdetail' class="nowpositionhref">教学班管理</a>>
                        <a href="" class="nowpositionhref" >开设教学班</a>
                    </p>
                 </div>

				<div id='result'></div>
                <table class="table table-striped table-bordered table-condensed">
                	<thead style="background-color:#09F">
                	<tr >
                    	<th>
                        	添加教学班
                        </th>
                    </tr>
                      </thead>
                    <tbody>
                    <form  id='form1' method='post' action='__URL__/class_add' class="form-inline">	
                    	<tr style="height:40px;">
                        	<td>
                             <input type='text' class="input-xlarge" name='id' placeholder="教学班序号">
                            &nbsp;&nbsp;<span style="color:red">*</span>
                            </td>
                        </tr>
                        <tr style="height:40px;">
                        	<td> 
                            <code>课程名称</code>
                            <select name="courseid"  class="input-xlarge">
                                    <option></option>
                                     <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value =	<?php echo ($vo["courseid"]); ?>><?php echo ($vo["cname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    &nbsp;&nbsp; <span style="color:red">*</span>
                            </td>
                        </tr>
                        <tr style="height:40px;">
                        	<td>
                            	 <code>
                                    <input type='checkbox' name='public' value="1">是否为公共课  
                                   </code>
                            </td>
                        </tr>
                        <tr style="height:40px;">
                        	<td> <input type='hidden' name='no' value=<?php echo ($no); ?>>
                               
                                <input type='submit' value='提交' class="btn btn-success ">
                            	
                            </td>
                        </tr>
                    </tbody>
                     </form>
             </table>
               
            </div>
           </div>
          </div>
</body>
</html>